<template>
  <div class="goods-container">
    <h3>{{goodsdisc.basicInfo.name}}</h3>

    <hr />

    <div class="content" v-html="goodsdisc.content"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      goodsdisc: []
    };
  },
  created() {
    this.getGoodsDisc();
  },
  methods: {
    getGoodsDisc() {
      this.$http
        .get(
          "https://api.it120.cc/lisa/shop/goods/detail?id=" +
            this.$route.params.id
        )
        .then(result => {
          if (result.body.code === 0) {
            this.goodsdisc = result.body.data;
          }
        });
    }
  }
};
</script>

<style lang="scss" scoped>
.goods-container {
  padding: 16px;
  h3 {
    font-size: 16px;
    font-weight: bold;
    color: #226aff;
    text-align: center;
    margin: 15px 0;
  }
}
</style>